package bean;

import java.util.Objects;

public class Express{
    private String Company;

    @Override
    public String toString() {
        return "Express{" +
                "Company='" + Company + '\'' +
                ", number='" + number + '\'' +
                ", position=" + position +
                ", code='" + code + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Express express = (Express) o;
        return position == express.position && Objects.equals(Company, express.Company) && Objects.equals(number, express.number) && Objects.equals(code, express.code);
    }

    @Override
    public int hashCode() {
        return Objects.hash(Company, number, position, code);
    }

    private String number;
    private int position;
    private String code;

    public Express(String company, int position, String code) {
        Company = company;
        this.position = position;
        this.code = code;
    }

    public Express() {
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getCompany() {
        return Company;
    }

    public void setCompany(String company) {
        Company = company;
    }
}
